/**
 * Created with Vim7.3 ubuntu12.04
 * @fileOverview :  Index
 * @author : Lyle <lylechen2014@gmial.com>
 * @since : 2014-08-18 11:00:47
 * @filename : static/mnm/src/views/index.js
 * @version : 
 * @description : 
 */
define(function(require, exports, module){

        require("{resourceUrl}css/mnm/public.css");
        require("{resourceUrl}css/mnm/index.css");

        var IndexView,
            $ = require('$'),
            _ = require('underscore'),
	    Backbone = require('backbone'),
            lang = require('{baseSea}I18N/mnm/{locale}'),
            tpl = require('{resourceUrl}tpl/mnm/index.tpl');
	
        IndexView = Backbone.View.extend({

		//el: '#index',
                el: 'body',
 
		template: _.template(tpl),

		events: {
                    "tap .joinus"       : "joinusBind",   	        
                    "tap .signin"       : "signinBind"   	        
                },

		initialize: function () {
                
                },

		render: function (obj) {
                    if ($('#index').length < 1) { 
                        $('body').append(this.template(lang));  
                    } else {
		        $('#index').show();
                    }
                },

                joinusBind : function() {
                     window.location.href = '#joinus/whole'; 
                },
 
                signinBind : function() {
                     window.location.href = '#signin/whole'; 
                }
	});

	module.exports = IndexView;
})

